package com.niiwoo.civet.account.dao.mapper;

import com.niiwoo.civet.account.dao.entity.AccountBase;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

@Component
public interface AccountBaseMapperExt extends AccountBaseMapper{

    AccountBase selectByPrimaryKeyForUpdate(Long accountId);

    //List<AccountBase> selectByUserIdSetAndAccountRole(@Param("userIdSet") Set<String> userIdSet, @Param("accountRole") Byte accountRole);
    
    List<AccountBase> queryAccountListByAccountNoSet(@Param("accountNoSet") Set<String> accountNoSet);

    BigDecimal countAvailableAmountByUserIdsAndAccountRole(@Param("userIds") List<String> userIds,@Param("accountRole") Byte accountRole);
    
    /**
     * 开通投资存管帐户指定天数
     * 
     * @param number
     * @return
     */
	List<AccountBase> selectOpenInvestmentAccountForAssignDays(@Param("number") Integer number);
	
	/**
	 * 查询开通存管帐户（借款、投资）的用户ID
	 * 
	 * @param userIdList
	 * @return
	 */
	List<String> selectOpenBankAccoutByUserIdList(@Param("userIdList") List<String> userIdList);
}